﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using KMFrame.Permission.BLL;
using KMFrame.Util;
using NBearLite;
using KMFrame.Permission.NBL;

namespace WebSite.admin.users
{
    public partial class userlist : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                IEnumerable<ShowUserList> list = _getlist();
                HtmlHelper.BindHtmlTable(UserList_list, list, "UserID", "sid_user");
            }
        }

        private IEnumerable<ShowUserList> _getlist()
        {
            Users ubll = new Users();
            WhereClip where = DBColumns.KM_Users.IsLimit == 0;
            //where = where && DBColumns.KM_Users.IsLimit == true;
            return ubll.ShowUserList(where);
        }

        //客户端加载模式
        public string GetJsonList()
        {
            IEnumerable<ShowUserList> list = _getlist();
            return JsonHelper.GetJson(list, "UserID");
        }
    }
}